<html>
<head>
<g:javascript library="jquery"  /> 
<g:javascript library="facturacion" />
</head>
<body>
    <g:if test="${flash.message}">
    <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${facturaInstance}">
    <div class="errors">
        <g:renderErrors bean="${facturaInstance}" as="list" />
    </div>
	</g:hasErrors>
	<div align="center">
	 	<g:uploadForm name="form" controller="facturacion" >
	 	
	 		<g:hiddenField name="id" value="${facturaInstance.id}" />
	 		
<%--	 		<table style="border: 0px; width: 620px;">--%>
<%--	 		<tr><td width="40%">--%>
			    <div class="dialog" align="center">
			        <table style="width: 500px;">
  			            	<g:render template="/templates/headerPostreTAMI"></g:render>
			            	<g:render template="/templates/contentImprimir" model="facturaInstance: facturaInstance"></g:render>
			        </table>
			    </div>
			    
			    <br><br>
			    <g:render template="/templates/tablaItems" model="['listadoItems':facturaInstance?.itemFactura, 'edit':false]"></g:render>
<%--	 		</td>--%>
<%--	 		<td style="border-left: solid black 2px;" width="60%">--%>
<%--				    <div class="dialog" align="center">--%>
<%--			        <table style="width: 300px;">--%>
<%--							<g:render template="/templates/headerPostreTAMI"></g:render>--%>
<%--		           			<g:render template="/templates/contentImprimir" model="facturaInstance: facturaInstance"></g:render>--%>
<%--			        </table>--%>
<%--			    </div>--%>
			    
<%--			    <br><br>--%>
<%--			    <g:render template="/templates/tablaItems" model="['listadoItems':facturaInstance?.itemFactura, 'edit':false]"></g:render>--%>
<%--	 		</td>--%>
<%--	 		</table>--%>
	 		
	    
	    	</g:uploadForm>
	    </div>
	    <script type="text/javascript">
	    	window.print();
	    	//window.close();
	    </script>

</body>
</html>